/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: MENG
 * Date: 2022-06-24
 * Time: 23:14
 */
public class Test5 {
    public static void main(String[] args) {
        int a = 10;
        Integer integer = a;
        int val = integer;//自动拆箱
        System.out.println(val);

        int val1 = integer.intValue();//显示拆箱
        System.out.println(val1);

        double val2 = integer.doubleValue();
        System.out.println(val2);//拆箱成double类型的数据
    }

    public static void main1(String[] args) {
        int a = 10;
        Integer integer = a;//自动装箱
        Integer integer1 = new Integer(a);//显示装箱
        Integer integer2 = Integer.valueOf(a);//显示装箱



    }
}
